2001-10-18 Matthias Clasen <matthiasc@poet.de>
+ * gdk/gdkwindow.h, gdk/gdkpixmap.h, gdk/x11/gdkx.h,
+ gdk/x11/gdkwindow-x11.c, gdk/x11/gdkpixmap-x11.c,
+ gdk/win32/gdkwin32.h, gdk/win32/gdkwindow-win32.c,
+ gdk/win32/gdkpixmap-win32.c, gdk/linux-fb/gdkfb.h,
+ gdk/linux-fb/gdkwindow-fb.c, gdk/linux-fb/gdkpixmap-fb.c:
+ Add gdk_window_lookup, gdk_window_foreign_new, gdk_pixmap_lookup
+ and gkd_pixmap_foreign_new to the gdk frontend api. (#62063)
+
+ * gtk/gtkselection.c: Remove gdk backend dependencies. (#62063)
+
* gtk/gtkspinbutton.c (gtk_spin_button_size_request):
Don't restrict the width of the spinbutton entry field
to 10 digits. (#58681)
2001-10-18 Matthias Clasen <matthiasc@poet.de>
+ * gdk/gdkwindow.h, gdk/gdkpixmap.h, gdk/x11/gdkx.h,
+ gdk/x11/gdkwindow-x11.c, gdk/x11/gdkpixmap-x11.c,
+ gdk/win32/gdkwin32.h, gdk/win32/gdkwindow-win32.c,
+ gdk/win32/gdkpixmap-win32.c, gdk/linux-fb/gdkfb.h,
+ gdk/linux-fb/gdkwindow-fb.c, gdk/linux-fb/gdkpixmap-fb.c:
+ Add gdk_window_lookup, gdk_window_foreign_new, gdk_pixmap_lookup
+ and gkd_pixmap_foreign_new to the gdk frontend api. (#62063)
+
+ * gtk/gtkselection.c: Remove gdk backend dependencies. (#62063)
+
* gtk/gtkspinbutton.c (gtk_spin_button_size_request):
Don't restrict the width of the spinbutton entry field
to 10 digits. (#58681)
2001-10-18 Matthias Clasen <matthiasc@poet.de>
+ * gdk/gdkwindow.h, gdk/gdkpixmap.h, gdk/x11/gdkx.h,
+ gdk/x11/gdkwindow-x11.c, gdk/x11/gdkpixmap-x11.c,
+ gdk/win32/gdkwin32.h, gdk/win32/gdkwindow-win32.c,
+ gdk/win32/gdkpixmap-win32.c, gdk/linux-fb/gdkfb.h,
+ gdk/linux-fb/gdkwindow-fb.c, gdk/linux-fb/gdkpixmap-fb.c:
+ Add gdk_window_lookup, gdk_window_foreign_new, gdk_pixmap_lookup
+ and gkd_pixmap_foreign_new to the gdk frontend api. (#62063)
+
+ * gtk/gtkselection.c: Remove gdk backend dependencies. (#62063)
+
* gtk/gtkspinbutton.c (gtk_spin_button_size_request):
Don't restrict the width of the spinbutton entry field
to 10 digits. (#58681)
2001-10-18 Matthias Clasen <matthiasc@poet.de>
+ * gdk/gdkwindow.h, gdk/gdkpixmap.h, gdk/x11/gdkx.h,
+ gdk/x11/gdkwindow-x11.c, gdk/x11/gdkpixmap-x11.c,
+ gdk/win32/gdkwin32.h, gdk/win32/gdkwindow-win32.c,
+ gdk/win32/gdkpixmap-win32.c, gdk/linux-fb/gdkfb.h,
+ gdk/linux-fb/gdkwindow-fb.c, gdk/linux-fb/gdkpixmap-fb.c:
+ Add gdk_window_lookup, gdk_window_foreign_new, gdk_pixmap_lookup
+ and gkd_pixmap_foreign_new to the gdk frontend api. (#62063)
+
+ * gtk/gtkselection.c: Remove gdk backend dependencies. (#62063)
+
* gtk/gtkspinbutton.c (gtk_spin_button_size_request):
Don't restrict the width of the spinbutton entry field
to 10 digits. (#58681)
2001-10-18 Matthias Clasen <matthiasc@poet.de>
+ * gdk/gdkwindow.h, gdk/gdkpixmap.h, gdk/x11/gdkx.h,
+ gdk/x11/gdkwindow-x11.c, gdk/x11/gdkpixmap-x11.c,
+ gdk/win32/gdkwin32.h, gdk/win32/gdkwindow-win32.c,
+ gdk/win32/gdkpixmap-win32.c, gdk/linux-fb/gdkfb.h,
+ gdk/linux-fb/gdkwindow-fb.c, gdk/linux-fb/gdkpixmap-fb.c:
+ Add gdk_window_lookup, gdk_window_foreign_new, gdk_pixmap_lookup
+ and gkd_pixmap_foreign_new to the gdk frontend api. (#62063)
+
+ * gtk/gtkselection.c: Remove gdk backend dependencies. (#62063)
+
* gtk/gtkspinbutton.c (gtk_spin_button_size_request):
Don't restrict the width of the spinbutton entry field
to 10 digits. (#58681)
2001-10-18 Matthias Clasen <matthiasc@poet.de>
+ * gdk/gdkwindow.h, gdk/gdkpixmap.h, gdk/x11/gdkx.h,
+ gdk/x11/gdkwindow-x11.c, gdk/x11/gdkpixmap-x11.c,
+ gdk/win32/gdkwin32.h, gdk/win32/gdkwindow-win32.c,
+ gdk/win32/gdkpixmap-win32.c, gdk/linux-fb/gdkfb.h,
+ gdk/linux-fb/gdkwindow-fb.c, gdk/linux-fb/gdkpixmap-fb.c:
+ Add gdk_window_lookup, gdk_window_foreign_new, gdk_pixmap_lookup
+ and gkd_pixmap_foreign_new to the gdk frontend api. (#62063)
+
+ * gtk/gtkselection.c: Remove gdk backend dependencies. (#62063)
+
* gtk/gtkspinbutton.c (gtk_spin_button_size_request):
Don't restrict the width of the spinbutton entry field
to 10 digits. (#58681)
2001-10-18 Matthias Clasen <matthiasc@poet.de>
+ * gdk/gdkwindow.h, gdk/gdkpixmap.h, gdk/x11/gdkx.h,
+ gdk/x11/gdkwindow-x11.c, gdk/x11/gdkpixmap-x11.c,
+ gdk/win32/gdkwin32.h, gdk/win32/gdkwindow-win32.c,
+ gdk/win32/gdkpixmap-win32.c, gdk/linux-fb/gdkfb.h,
+ gdk/linux-fb/gdkwindow-fb.c, gdk/linux-fb/gdkpixmap-fb.c:
+ Add gdk_window_lookup, gdk_window_foreign_new, gdk_pixmap_lookup
+ and gkd_pixmap_foreign_new to the gdk frontend api. (#62063)
+
+ * gtk/gtkselection.c: Remove gdk backend dependencies. (#62063)
+
* gtk/gtkspinbutton.c (gtk_spin_button_size_request):
Don't restrict the width of the spinbutton entry field
to 10 digits. (#58681)
GdkColor *transparent_color,
gchar **data);
+/* Functions to create/lookup pixmaps from their native equivalents */
+GdkPixmap* gdk_pixmap_foreign_new (GdkNativeWindow anid);
+GdkPixmap* gdk_pixmap_lookup (GdkNativeWindow anid);
+
#ifndef GDK_DISABLE_DEPRECATED
#define gdk_bitmap_ref gdk_drawable_ref
#define gdk_bitmap_unref gdk_drawable_unref
gboolean gdk_window_set_static_gravities (GdkWindow *window,
gboolean use_static);
+/* Functions to create/lookup windows from their native equivalents */
+GdkWindow* gdk_window_foreign_new (GdkNativeWindow anid);
+GdkWindow* gdk_window_lookup (GdkNativeWindow anid);
+
+
/* GdkWindow */
#ifndef GDK_DISABLE_DEPRECATED
#define GDK_ROOT_WINDOW() gdk_root_window
#define GDK_DISPLAY() gdk_display
-#define gdk_window_foreign_new(xid) gdk_window_ref(xid)
-#define gdk_window_lookup(xid) ((GdkWindow*) (xid))
-#define gdk_pixmap_lookup(xid) ((GdkPixmap*) (xid))
-#define gdk_font_lookup(xid) ((GdkFont*) (xid))
+#define gdk_font_lookup(xid) ((GdkFont*) (xid))
typedef enum {
GDK_FB_0_DEGREES,
return pixmap;
}
+
+GdkPixmap*
+gdk_pixmap_foreign_new (GdkNativeWindow anid)
+{
+ return (GdkPixmap*) gdk_drawable_ref (anid);
+}
+
+GdkPixmap*
+gdk_pixmap_lookup (GdkNativeWindow anid)
+{
+ return (GdkPixmap*) (anid);
+}
+
return TRUE;
}
+
+GdkWindow*
+gdk_window_foreign_new (GdkNativeWindow anid)
+{
+ return (GdkWindow*) gdk_drawable_ref (anid);
+}
+
+GdkWindow*
+gdk_window_lookup (GdkNativeWindow anid)
+{
+ return (GdkWindow*) (anid);
+}
+
return pixmap;
}
+
+GdkWindow*
+gdk_window_lookup (GdkNativeWindow hbm)
+{
+ return (GdkPixmap*) gdk_win32_handle_table_lookup (hbm);
+}
#define GDK_ROOT_WINDOW() ((guint32) HWND_DESKTOP)
#define GDK_DISPLAY() NULL
-/* Functions to create GDK pixmaps and windows from their native equivalents */
-GdkPixmap *gdk_pixmap_foreign_new (GdkNativeWindow anid);
-GdkWindow *gdk_window_foreign_new (GdkNativeWindow anid);
-
/* Return the Gdk* for a particular HANDLE */
gpointer gdk_win32_handle_table_lookup (GdkNativeWindow handle);
/* Translate from drawable to windows handle */
HWND gdk_win32_drawable_get_handle (GdkDrawable *drawable);
-#define gdk_window_lookup(hwnd) (GdkWindow*) gdk_win32_handle_table_lookup (hwnd)
-#define gdk_pixmap_lookup(hbm) (GdkPixmap*) gdk_win32_handle_table_lookup (hbm)
-
/* Return a device context to draw in a drawable, given a GDK GC,
* and a mask indicating which GC values might be used (for efficiency,
* no need to muck around with text-related stuff if we aren't going
return window;
}
+GdkWindow*
+gdk_window_lookup (GdkNativeWindow hwnd)
+{
+ return (GdkWindow*) gdk_win32_handle_table_lookup (hwnd);
+}
+
void
_gdk_windowing_window_destroy (GdkWindow *window,
gboolean recursing,
/**
* gdk_pixmap_foreign_new:
- * @anid: an X window ID for a pixmap
+ * @anid: a native pixmap handle.
*
- * Creates a #GdkPixmap for the Xlib pixmap ID @anid.
- * If the Xlib pixmap is destroyed while creating
- * the #GdkPixmap, this function returns %NULL.
- *
- * Return value: a new #GdkPixmap
+ * Wraps a native window in a #GdkPixmap.
+ * This may fail if the pixmap has been destroyed.
+ *
+ * For example in the X backend, a native pixmap handle is an Xlib
+ * <type>XID</type>.
+ *
+ * Return value: the newly-created #GdkPixmap wrapper for the
+ * native pixmap or %NULL if the pixmap has been destroyed.
**/
GdkPixmap*
gdk_pixmap_foreign_new (GdkNativeWindow anid)
return pixmap;
}
+
+/**
+ * gdk_pixmap_lookup:
+ * @anid: a native pixmap handle.
+ *
+ * Looks up the #GdkPixmap that wraps the given native pixmap handle.
+ *
+ * For example in the X backend, a native pixmap handle is an Xlib
+ * <type>XID</type>.
+ *
+ * Return value: the #GdkWindow wrapper for the native window,
+ * or %NULL if there is none.
+ **/
+GdkPixmap*
+gdk_pixmap_lookup (GdkNativeWindow anid)
+{
+ return (GdkPixmap*) gdk_xid_table_lookup (xid);
+}
/**
* gdk_window_foreign_new:
- * @anid: an Xlib window ID
+ * @anid: a native window handle.
*
- * Wraps an X window ID (from Xlib) with a #GdkWindow.
- * May fail if the window has been destroyed, if so returns %NULL.
+ * Wraps a native window in a #GdkWindow.
+ * This may fail if the window has been destroyed.
+ *
+ * For example in the X backend, a native window handle is an Xlib
+ * <type>XID</type>.
*
- * Return value: the #GdkWindow wrapper for the X window
+ * Return value: the newly-created #GdkWindow wrapper for the
+ * native window or %NULL if the window has been destroyed.
**/
GdkWindow *
gdk_window_foreign_new (GdkNativeWindow anid)
return window;
}
+/**
+ * gdk_window_lookup:
+ * @anid: a native window handle.
+ *
+ * Looks up the #GdkWindow that wraps the given native window handle.
+ *
+ * For example in the X backend, a native window handle is an Xlib
+ * <type>XID</type>.
+ *
+ * Return value: the #GdkWindow wrapper for the native window,
+ * or %NULL if there is none.
+ **/
+GdkWindow *
+gdk_window_lookup (GdkNativeWindow anid)
+{
+ return (GdkWindow*) gdk_xid_table_lookup (anid);
+}
+
void
_gdk_windowing_window_destroy (GdkWindow *window,
gboolean recursing,
* is useless unless we also have the visual. */
GdkColormap* gdkx_colormap_get (Colormap xcolormap);
-/* Functions to create pixmaps and windows from their X equivalents */
-GdkPixmap *gdk_pixmap_foreign_new (GdkNativeWindow anid);
-GdkWindow *gdk_window_foreign_new (GdkNativeWindow anid);
-
/* Return the Gdk* for a particular XID */
gpointer gdk_xid_table_lookup (XID xid);
/* returns TRUE if we support the given WM spec feature */
gboolean gdk_net_wm_supports (GdkAtom property);
-#define gdk_window_lookup(xid) ((GdkWindow*) gdk_xid_table_lookup (xid))
-#define gdk_pixmap_lookup(xid) ((GdkPixmap*) gdk_xid_table_lookup (xid))
-
#ifndef GDK_DISABLE_DEPRECATED
Display * gdk_x11_font_get_xdisplay (GdkFont *font);
#include <string.h>
#include "gdk.h"
-#if defined (GDK_WINDOWING_X11)
-#include "x11/gdkx.h" /* For gdk_window_lookup() */
-#elif defined (GDK_WINDOWING_WIN32)
-#include "win32/gdkwin32.h" /* For gdk_window_lookup() */
-#elif defined (GDK_WINDOWING_FB)
-#include "linux-fb/gdkfb.h" /* For gdk_window_lookup() */
-#endif
-
#include "gtkmain.h"
#include "gtkselection.h"
#include "gtksignal.h"
info->num_incrs = 0;
/* Create GdkWindow structure for the requestor */
-
-#if defined(GDK_WINDOWING_WIN32) || defined(GDK_WINDOWING_X11) || defined(GDK_WINDOWING_FB)
info->requestor = gdk_window_lookup (event->requestor);
if (!info->requestor)
info->requestor = gdk_window_foreign_new (event->requestor);
-#else
- info->requestor = NULL;
-#endif
/* Determine conversions we need to perform */